package com.oss.validator.employee;

import com.jfinal.core.Controller;
import com.jfinal.render.JsonRender;
import com.jfinal.validate.Validator;
import com.oss.utils.constants.DataDictionary;

public class loginByEmployee extends Validator {

    @Override
    protected void validate(Controller c) {
        validateRequired("account", "msg", "请填写账号");
        validateRequired("passWord", "msg", "请选择密码");
    }

    @Override
    protected void handleError(Controller c) {
        c.setAttr("code", DataDictionary.FAILURE);
        c.render(new JsonRender().forIE());
    }

}
